package com.fr.data.impl;

import com.fr.base.FCloneable;
import com.fr.base.FRContext;
import com.fr.base.file.DatasourceManager;
import com.fr.base.file.DeprecatedDictionaryManager;
import com.fr.base.xml.XMLReadable;
import com.fr.base.xml.XMLableReader;
import com.fr.data.Dictionary;
import java.util.logging.Level;
import java.util.logging.Logger;

public class NameDictionary62
  implements XMLReadable
{
  private String name = "";

  public Dictionary createDict()
  {
    Dictionary localDictionary = null;
    DatasourceManager localDatasourceManager = FRContext.getDatasourceManager();
    localDictionary = localDatasourceManager.getDeprecatedDictionaryManager().getDictionary(this.name);
    if (localDictionary == null)
      localDictionary = Dictionary.EMPTY_DICT;
    else
      try
      {
        localDictionary = (Dictionary)localDictionary.clone();
      }
      catch (CloneNotSupportedException localCloneNotSupportedException)
      {
        FRContext.getLogger().log(Level.WARNING, localCloneNotSupportedException.getMessage(), localCloneNotSupportedException);
      }
    return localDictionary;
  }

  public void readXML(XMLableReader paramXMLableReader)
  {
    if (paramXMLableReader.isChildNode())
    {
      String str2 = paramXMLableReader.getTagName();
      if (("DictName".equals(str2)) || ("MapName".equals(str2)))
      {
        String str1;
        if ((str1 = paramXMLableReader.getElementValue()) != null)
          this.name = str1;
      }
    }
  }
}